package com.xiaoshou.pojo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class QuestionFilesRelId implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private String questionid;
	private String filesid;

	// Constructors

	/** default constructor */
	public QuestionFilesRelId() {
	}

	/** full constructor */
	public QuestionFilesRelId(String questionid, String filesid) {
		this.questionid = questionid;
		this.filesid = filesid;
	}

	// Property accessors

	@Column(name = "questionid", nullable = false, length = 40)
	public String getQuestionid() {
		return this.questionid;
	}

	public void setQuestionid(String questionid) {
		this.questionid = questionid;
	}

	@Column(name = "filesid", nullable = false, length = 40)
	public String getFilesid() {
		return this.filesid;
	}

	public void setFilesid(String filesid) {
		this.filesid = filesid;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof QuestionFilesRelId))
			return false;
		QuestionFilesRelId castOther = (QuestionFilesRelId) other;

		return ((this.getQuestionid() == castOther.getQuestionid()) || (this
				.getQuestionid() != null && castOther.getQuestionid() != null && this
				.getQuestionid().equals(castOther.getQuestionid())))
				&& ((this.getFilesid() == castOther.getFilesid()) || (this
						.getFilesid() != null && castOther.getFilesid() != null && this
						.getFilesid().equals(castOther.getFilesid())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getQuestionid() == null ? 0 : this.getQuestionid()
						.hashCode());
		result = 37 * result
				+ (getFilesid() == null ? 0 : this.getFilesid().hashCode());
		return result;
	}

}